/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package samoloty.view;


import java.awt.Color;
import java.awt.Font;
import java.awt.Point;
import javax.swing.JSeparator;

/**
 *
 * @author frankowp
 */
public class MySeparator extends JSeparator{
    public final static int NORMAL = 1;
    public final static int BOLD = 2;

    public MySeparator(){
        super(JSeparator.HORIZONTAL);
        initLabel();
    }

    private void initLabel(){
        this.setBlue();
    }

    public void setBlue(){
        this.setForeground(MyColors.getBlue());
        this.setBackground(MyColors.getBlack());
    }

    public void setPosition(Point p){
        this.setBounds(p.x, p.y, getPreferredSize().width, getPreferredSize().height);
    }

    public void setPositionByRight(Point p){
        this.setBounds((int)(p.x-getPreferredSize().width), p.y, getPreferredSize().width, getPreferredSize().height);
    }


}
